define(()=>{
    return function(data,box){
        let str = ""
        data.forEach(val=>{
            str+=`<div class="box" index="${val.proId}">  
            <a href="../detail.html?id=${val.proId}" class="box_a" target="blank">
                    <div class="pic">
                        <img src="${val.img}" alt="">
                        <p class="nostorage">${val.no}</p>
                    </div>
                    <div class="info">
                        <p class="name">${val.proName}</p>
                        <p class="sales">已售：${val.sales}件<span class="minnum">起批量：${val.minnum}</span></p>
                        <p class="price">建议零售价：￥<span>${val.price}</span></p>
                    </div></a>
                    <input type="button" class="add" value="加入购物车">
                </div>`
        })
        box.html(str)
    }
})